.paper {
  .shadow_light_regular();
  margin: 3em auto;
  max-width: 1200px;
  padding: 2em;
  background-color: @white;
  box-sizing: border-box;

  &.flex {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;

    .article {
      flex-direction: column;
      width: 100%;
      box-sizing: border-box;

      &__main {
        height: 100%;
        box-sizing: border-box;
        overflow: auto;
      }

      &__aside {
        border-right: 1px solid @primary_border_color;
      }
    }
  }
}

.header {
  position: sticky;
  z-index: 3;
  top: 0;
  margin: 0 auto;
  border-bottom: 1px solid @border_color;
  background-color: @white;
  text-align: center;
  transition-duration: 0.3s;
  overflow: hidden;

  &_sticky {
    padding-left: 260px;
  }
}

.article {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  padding: 2em 0;
  font-size: 16px;
  line-height: 150%;

  &__main {
    flex: 1;
    padding: 0 2em;
    overflow: hidden;

    .section {
      overflow: visible;

      &__content,
      &__footer,
      &__header {
        overflow: visible;
      }

      &__header,
      &__content {
        margin: 0;
      }
    }
  }

  &__aside {
    flex-shrink: 0;
    width: 240px;
    border-left: 1px solid @border_color;

    &.ltr {
      border-right: 1px solid @border_color;
      border-left: none;
    }

    .outline-chapters {
      background-color: @white;
    }
  }
}

pre,
.section__pre {
  padding: 2em;
  font-family: 'Courier New', Arial, sans-serif;
  background-color: @bg_color;
  overflow: auto;
}

code,
.section__code {
  font-family: 'Courier New', Arial, sans-serif;
  font-size: 16px;
}

.footer {
  border-top: 1px solid @primary_border_color;
  padding: 3em 0;
  text-align: center;

  a {
    &:link,
    &:visited,
    &:hover {
      text-decoration: none;
      color: @success_color;
    }

    &:hover {
      text-decoration: underline;
    }
  }
}

.utils-border-right {
  border-right: 1px solid @primary_border_color;
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  html,
  body {
    margin: 0;
  }

  .paper {
    margin: 0;
    padding: 0;
  }

  .article__main {
    padding: 0 2em;
  }
}
